home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / BCU100.ARJ / DOSUTIL.DOC < prev    next >
Text File  |  1991-12-12  |  10KB  |  173 lines

  1. DOSUTIL.DOC
  2. Copyright (c) 1991 by R.P.McCormick
  3.                       79 Rye Street
  4.                       Broad Brook, CT 06016
  5.  
  6. USING DOS UTILITIES:
  7.  
  8. The following is an attempt to answer some of the questions I have 
  9. received from various users. Since explicit information is contained
  10. here, Advanced users are excused. This is intended to be very basic.
  11.  
  12. When you obtain a new utility program for your computer, two related 
  13. questions arise: 1. How to run it, and 2. Where to put it.
  14.  
  15. 1. There are several ways you can run the program.
  16.  
  17.    A. If the program is in the "current directory", typing the program's
  18.       name runs the program. (see notes 1 & 2)
  19.       In this case, you do not need to add any prefix to the program name
  20.       to run it. For an imaginary program called "PROG", just type 
  21.       "PROG" followed by a <CR> (see note 3).
  22.  
  23.    B. If the program is in a directory other than the current one, that
  24.       is, if it is not in the same directory the prompt shows (note 1)
  25.       you may need to type the program's full name, which could include
  26.       the drive prefix and directory name(s) in front of the program's name.
  27.       Example: If you have placed the program in a directory called
  28.       "newstuff" on a floppy in the A: drive, and you were currently
  29.       anywhere on the C: drive, you would type the full program name 
  30.       as "A:\NEWSTUFF\PROG", then <CR>.
  31.  
  32.    C. Since this is somewhat awkward, it is generally worth the trouble
  33.       to learn how to make it easier. One very small step in this direction
  34.       would be to "go" to drive A: ( Type "A:" <CR> ), and then change
  35.       the current directory on the A: drive to the directory the program
  36.       is in by using the DOS command "CD". For example, to get to the top
  37.       level while in any directory on the A: drive, type "A:\" <CR>. The
  38.       backslash tells DOS to go to the top level. Then "CD NEWSTUFF" <CR>
  39.       takes you to the directory containing the program. You can always
  40.       do a "DIR" <CR> to verify that it is there. Then, if you want to
  41.       use the program from anywhere on the C: drive, you do not need
  42.       to use the full program name. Only the drive prefix needs to be
  43.       added. Example: "A:PROG" <CR> will run it.
  44.       
  45. 2.    The best place to put utilities.
  46.  
  47.    A. Copying the program to the C: drive is another small but worthwhile
  48.       step. You could put the new program at the top level of the hard
  49.       drive as follows: Go to the directory on A: where the program is,
  50.       and type "copy prog.exe c:\" <CR>. The backslash directs the program
  51.       to c:'s top level. The reason for doing this is that now, the program
  52.       is accessible from anywhere on the system by typing only the program
  53.       name, with no prefixes nor directory names.
  54.  
  55.    B. Placing a large number of utility programs at the top level eventually
  56.       gets messy. My personal preference, which I learned from other more
  57.       experienced people is to create a separate directory to contain all
  58.       my utility programs. I call mine UTILS. I also have a directory
  59.       where I keep all the batches. That is, files with the .BAT suffix.
  60.       This I call BATCH. It is easy to create these by using the DOS "MD"
  61.       or "make directory" command. Go to the top level using "CD\", then
  62.       "MD UTILS" <CR>. After moving (see note 7) the programs into the 
  63.       UTILS directory, they will no longer respond to your typing the
  64.       program name without including the directory name as a prefix. 
  65.       That is, you would have to type "C:\UTILS\PROG" <CR> to guarantee 
  66.       that the program will run from anywhere on your system. 
  67.       So there is one other thing that has to be done. That is, you must
  68.       add the directory name "C:\UTILS" to the DOS "PATH". (see note 5)
  69.       after that is done, you will not have to type the drive nor 
  70.       directory name again.
  71.       
  72.       
  73.  
  74. Many programs allow you to enter a question mark or the letter "H" to see
  75. a help file instead of running the program. You should read the help file 
  76. and any .DOC or README files supplied before running the program.         
  77.  
  78. NOTES:
  79. 1. Most computers will display the current directory's name as part of the 
  80.    prompt. Example: C:\ identifies the "root" or top level directory, while
  81.    C:\DOS means your current directory is called "DOS". I loosely refer to
  82.    this as "being at" the DOS directory. Unfortunately, this feature is not
  83.    built in to all computers. Some merely show what drive you are on.
  84.    Possibly the most useful DOS command is "DIR". Typing DIR <CR> 
  85.    (see note 3) will tell you what directory you are in. (Note 4 discusses
  86.    how to make the prompt tell you where you are at.)
  87.  
  88. 2. All programs have a suffix, typically .EXE, .COM, .BAS, or .BAT.
  89.    So, the example program would be typically listed as "PROG.EXE".
  90.  
  91. 3. By <CR>, I mean to hit the "Enter" key or "Return" key or whatever
  92.    it is called on your computer. CR stands for Carriage Return.
  93.  
  94. 4. To make the DOS prompt include the name of the current directory,
  95.    include the following statement in your "AUTOEXEC.BAT" file.
  96.    PROMPT = $p$g
  97.    See note 6 about editing this file.
  98.  
  99. 5. To add a directory name to DOS "PATH":
  100.    A: If there is no "PATH" statement in AUTOEXEC.BAT add the following:
  101.       PATH = C:\UTILS;C:\BATCH
  102.    B: If there is an existing "PATH" statement in AUTOEXEC.BAT, you can
  103.       add to it, as long as the total length of the line does not exceed
  104.       127 characters. If the present statement reads "PATH = C:\DOS" for
  105.       example, change it to read PATH = "C:\DOS;C:\UTILS;C:\BATCH".
  106.       Note the use of the semicolon to separate the names.
  107.  
  108. 6. Modifying the AUTOEXEC.BAT file:
  109.    A. First thing is to look at the existing file. "Go" to the top level
  110.       of the C: drive and use the DOS command "TYPE". You enter
  111.       "TYPE AUTOEXEC.BAT" <CR>. There is the possibility that there is
  112.       no such file. If this is the case, creating one from scratch is
  113.       not all that difficult. (See 6C.) On the other hand,
  114.  
  115.    B. Editing the AUTOEXEC.BAT file can be risky. It is run each time you
  116.       "boot up" the computer. If you mess up this file, things may look
  117.       very unfamiliar and operate strangely until it is straightened out.
  118.       What you need is a good Text Editor. One that operates on ASCII text
  119.       files. WordPerfect is no good for this. It puts all kinds of extra
  120.       codes in the file. I find that trying to use the tools DOS gives you
  121.       is both difficult and cumbersome. I don't know how to use the editor
  122.       they give you. "EDLIN" is it? I would not try to use EDLIN to edit
  123.       a file. It is possible, but I can't really encourage you to do so.
  124.       A couple of editors which I have tried are the Norton Editor, 
  125.       Borland's Turbo Pascal editor, and Borland's Turbo C editor.
  126.       They are all no-nonsense editors which can be used to edit 
  127.       AUTOEXEC.BAT. What I use is called PC-WRITE which is available
  128.       as shareware through most bulletin boards, or you can write them at
  129.       Quicksoft, 219 First Ave. N. #224, Seattle, WA 98109. They also have
  130.       a smaller version called PC-WRITE LITE which I have never used, but
  131.       have seen highly recommended by people who write for a living.
  132.       You may want to have a friend help you with the editing if you don't
  133.       feel comfortable with it. One possibility is to copy your existing
  134.       AUTOEXEC.BAT to a floppy and have someone at the office or school
  135.       edit it for you.
  136.  
  137.    C. If there is no file called AUTOEXEC.BAT on your computer, you may
  138.       want to create one containing the PROMPT and PATH statements 
  139.       mentioned above. This can be done using available DOS tools. 
  140.       But before doing that, do a "DIR" <CR> both to verify that you 
  141.       are "at" the top level on the C: drive, and that there is no file
  142.       by that name listed. DOS will give no warning that you are
  143.       destroying the original file when you do the following.
  144.  
  145.       At the C:\> prompt, type
  146.       "COPY CON: AUTOEXEC.BAT" <CR>
  147.       "PROMPT = $p$g" <CR>
  148.       "PATH = C:\UTILS;C:\BATCH" <CR>
  149.       <CTRL> "z" <CR>
  150.  
  151.       That last statement means to hold down the "Ctrl" key then press
  152.       and release the "z" key, then release the "Ctrl" key.
  153.       You can view the file you just created using the "TYPE" command.
  154.       You may want to practice the above on a different named file
  155.       to make sure you are doing it right, after which you could 
  156.       rename the file from whatever it was to AUTOEXEC.BAT using
  157.       the DOS command "REN" or rename. Example: If the file was called
  158.       "TESTFILE" you would enter "REN TESTFILE AUTOEXEC.BAT" <CR>.
  159.       The statements you entered in AUTOEXEC.BAT do not take effect until
  160.       the next time the computer is "booted". You can hit these 3 keys
  161.       simultaneously to reboot: <Alt> <Ctrl> <Delete>. Or use the "reset"
  162.       button found on some computers, or shut off the power, wait about
  163.       5 seconds, then turn it back on.
  164.  
  165.  
  166. 7.    There is no DOS "MOVE" command. When you copy a file, for example
  167.       by typing "COPY PROG.EXE C:\UTILS" <CR>, you leave a copy behind.
  168.       To "MOVE" a file you then delete the file at the source. You
  169.       probably do not want to delete the file on the floppy, but if
  170.       you are trying to "clean up" the top level of the C: drive, you
  171.       would type "DEL C:\PROG.EXE" <CR> to erase the file at that
  172.       location.
  173.